package com.demo.controller;


import org.springframework.security.core.Authentication;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/teacher")
public class TeacherController {

    @RequestMapping("/hello")
    public String auth(){
        return "Hello World!";
    }

//    @PreAuthorize("hasAnyRole('TEACHER')")
    @RequestMapping("/auth")
    public Object auth(Authentication authentication){
        return authentication;
    }



}
